1. Field of the Invention
The present invention relates to an image forming apparatus which stores data in a memory provided to an exchange unit.
2. Description of the Related Art
In a recently proposed copying machine and printer that use an electrophotography process, an exchange unit including a photosensitive drum as an expendible member adopts a detachable structure, and an EEPROM as a storage means is built in the exchange unit. Data such as the number of processed copies, and the like are stored in the EEPROM, and when the predetermined number of processed copies has been reached, the user is advised to exchange the exchange unit.
In such copying machine, a paper discharge sensor detects that fixing processing has ended and that a paper sheet has been discharged onto a paper discharge unit. A paper discharge detection signal from the paper discharge sensor is supplied to a CPU that controls the entire system. The CPU reads out, in advance, the number of previously processed copies stored in the EEPROM in the exchange unit, increments the readout number of previously processed copies by 1, and supplies the incremented value to the EEPROM to write the new number of processed copies. In this manner, the storage value of the EEPROM in the exchange unit is updated every time one paper sheet is discharged, and serves as a counter. When the storage value has reached a predetermined value, the CPU determines that the life of the photosensitive drum is finished, and displays a message prompting a user to exchange the exchange unit.
However, since the storage value of the EEPROM in the exchange unit is updated after the paper sheet is turned off during the interval from the timing immediately after paper discharge and before the end of writing into the EEPROM, the count value in the EEPROM may not be updated, or a random value may be written, i.e., data may be destroyed in some cases.